#include <Windows.h>

#include <stdio.h>

struct DATA
{
	char apiName[80];

	char msg1[1024];
	char msg2[1024];
	char msg3[1024];
	char msg4[1024];
	char msg5[1024];
	char msg6[1024];
	char msg7[1024];
	char msg8[1024];
	char msg9[1024];
	char msg10[1024];
};

void HookAPI(int x, LPVOID lpOld, LPVOID lpNew);
void RepairAPI(int x, LPVOID lpAddress);

void DoStufF();
BOOL Confirm(DATA data);
BOOL SendData(LPVOID data, DWORD size);
BOOL ReadData(OUT LPVOID data, DWORD size);

// MessageBoxW
typedef int (WINAPI *fpMessageBoxW)(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);

// NtTerminateProcess
typedef NTSTATUS (WINAPI *fpTerminateProcess)(HANDLE hProcess, NTSTATUS ExitStatus);

typedef BOOL (WINAPI *fpCreateProcessW)(
    __in_opt    LPCWSTR lpApplicationName,
    __inout_opt LPWSTR lpCommandLine,
    __in_opt    LPSECURITY_ATTRIBUTES lpProcessAttributes,
    __in_opt    LPSECURITY_ATTRIBUTES lpThreadAttributes,
    __in        BOOL bInheritHandles,
    __in        DWORD dwCreationFlags,
    __in_opt    LPVOID lpEnvironment,
    __in_opt    LPCWSTR lpCurrentDirectory,
    __in        LPSTARTUPINFOW lpStartupInfo,
    __out       LPPROCESS_INFORMATION lpProcessInformation
    );

typedef BOOL (WINAPI *fpWriteProcessMemory)(
    __in      HANDLE hProcess,
    __in      LPVOID lpBaseAddress,
    __in_bcount(nSize) LPCVOID lpBuffer,
    __in      SIZE_T nSize,
    __out_opt SIZE_T * lpNumberOfBytesWritten
    );

typedef BOOL
(WINAPI
*fpReadProcessMemory)(
    __in      HANDLE hProcess,
    __in      LPCVOID lpBaseAddress,
    __out_bcount_part(nSize, *lpNumberOfBytesRead) LPVOID lpBuffer,
    __in      SIZE_T nSize,
    __out_opt SIZE_T * lpNumberOfBytesRead
    );